package Song.Han.demo02;

import java.util.ArrayList;
import java.util.Collections;

public class Demo01Collections {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
/*
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");
        list.add("e");
*/
        //向集合中一次性添加一些元素
        Collections.addAll(list,"a","b","c","d","e");
        System.out.println(list);

        //打乱集合顺序
        Collections.shuffle(list);
        System.out.println(list);
    }
}
